package com.lfc.myframe.ui.login

import android.content.Context
import android.content.Intent
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import com.lfc.myframe.R

class LoginA : AppCompatActivity() {

    private var jumpType = 1//1 正常进入 2 退出登录 3 登录失效

    companion object {
        fun EnterThis(context: Context, string: String = "", int: Int = 0) {
            var intent = Intent(context, LoginA().javaClass)
            intent.putExtra("StrID", string)
            intent.putExtra("Type", int)
            context.startActivity(intent)
        }
    }

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_login)
        jumpType = intent!!.getIntExtra("Type", 0)
        //initMVP()
        initJumpType()
        initView()
        initData()
        getData()
    }

    private fun initJumpType() {
       /* if (jumpType == 2 || jumpType == 3) {
//            ExitLogin()
            ExitLoginSet()
            exitRequest()
        }
        if (jumpType == 3) {
//            showToast(strInfo)
            var strInfo = "您的账号在其他设备登录！"
            val materialDialog = MaterialDialog(baseContext)
            materialDialog.setCanceledOnTouchOutside(false)
            materialDialog.content(strInfo).title(baseContext.getString(R.string.DialogTitle))
                .btnNum(1).btnText("知道了")
                .btnTextColor(baseContext.getResources().getColor(R.color.blue))
                .showAnim(BounceEnter()).show()
            materialDialog.setOnBtnClickL(OnBtnClickL { materialDialog.dismiss() })
        }

        //        LUtils.showToask(baseContext, "登录失效,请重新登录！");
        if (LUtils.JudgeUserLogin(this)) {
            MainActivity.EnterThis(baseContext)
            finish()
            return
        }*/
    }

    private fun initView() {
    }

    private fun initData() {
    }

    private fun getData() {
    }


}
